// ---------------------------------------------------------------------------
// This software is in the public domain, furnished "as is", without technical
// support, and with no warranty, express or implied, as to its usefulness for
// any purpose.
//
// helper.C
// Some helper funcs
//
// Author: wuwei0509@gmail.com
// ---------------------------------------------------------------------------

#include <iostream>
#include "Helper.h"
using namespace std;

char * Helper::mallocSpace(__int64 len)
{
	char * space = NULL;
	try{
		space = new char [static_cast<size_t>(len)];
	} catch(...) {
		cerr<<"Error: Out of Memory!"<<endl;
	}
	memset(space, '\0', static_cast<size_t>(len));

	return space;
}